package com.aerozhonghuan.logisticsmall.modules.order.base;

import android.content.Context;

import com.aerozhonghuan.logisticsmall.modules.order.beans.OrderDetailBean;
import com.aerozhonghuan.logisticsmall.modules.order.beans.WaitReviewState;
import com.aerozhonghuan.logisticsmall.modules.order.beans.WaitServiceState;
import com.aerozhonghuan.logisticsmall.widget.CustomDialog;
import com.aerozhonghuan.logisticsmall.widget.ProgressDialogIndicator;

import java.util.LinkedHashMap;

/**
 * 描述
 *
 * @author zhangyonghui
 * 创建日期 2019-05-25
 */
public abstract class OrderState {
    public int status;
    public String name;
    public int iconId;
    public String infoDesc;
    public int infoIconId;
    public boolean isHaveActionBtn;
    public boolean isHaveactualPrice;
    public String actionBtnText;

    public LinkedHashMap<String, String> initStateInfoItemMap(OrderDetailBean orderDetailBean){
        LinkedHashMap<String, String> stateInfoItemMap = new LinkedHashMap<>();
        stateInfoItemMap.put("订单编号", orderDetailBean.getBillNumber());
        stateInfoItemMap.put("支付编号", orderDetailBean.getPayNumber());
        stateInfoItemMap.put("支付方式", orderDetailBean.getPayType());
        for (OrderDetailBean.EventTimeBean eventTimeBean: orderDetailBean.getEventTimes()) {
            stateInfoItemMap.put(eventTimeBean.getEventType(), eventTimeBean.getEventTime());
        }
        return stateInfoItemMap;
    }

    public CustomDialog getDialog(Context context, String billId, OnDialogListener onDialogListener){
        return null;
    }

    public interface OnDialogListener{
        void onSuccess();
        void onFailure();
    }
}
